home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectShow / Editing / DexterVB / frmClip.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-08  |  20.1 KB  |  531 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
  3. Begin VB.Form frmClip 
  4.    Caption         =   "Clip Menu"
  5.    ClientHeight    =   5715
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   7005
  9.    Icon            =   "frmClip.frx":0000
  10.    LinkTopic       =   "Form2"
  11.    LockControls    =   -1  'True
  12.    ScaleHeight     =   5715
  13.    ScaleWidth      =   7005
  14.    StartUpPosition =   1  'CenterOwner
  15.    Begin VB.CommandButton cmdOK 
  16.       Caption         =   "OK"
  17.       Default         =   -1  'True
  18.       Height          =   340
  19.       Left            =   4500
  20.       TabIndex        =   11
  21.       Top             =   5325
  22.       Width           =   1095
  23.    End
  24.    Begin VB.CommandButton cmdCancel 
  25.       Caption         =   "Cancel"
  26.       Height          =   340
  27.       Left            =   5700
  28.       TabIndex        =   12
  29.       Top             =   5325
  30.       Width           =   1215
  31.    End
  32.    Begin VB.Frame fraFixture 
  33.       Height          =   5190
  34.       Left            =   75
  35.       TabIndex        =   13
  36.       Top             =   0
  37.       Width           =   6840
  38.       Begin VB.TextBox txtMediaName 
  39.          Height          =   375
  40.          Left            =   1470
  41.          Locked          =   -1  'True
  42.          TabIndex        =   0
  43.          Top             =   300
  44.          Width           =   3975
  45.       End
  46.       Begin VB.TextBox txtMStart 
  47.          BeginProperty DataFormat 
  48.             Type            =   1
  49.             Format          =   "0"
  50.             HaveTrueFalseNull=   0
  51.             FirstDayOfWeek  =   0
  52.             FirstWeekOfYear =   0
  53.             LCID            =   1033
  54.             SubFormatType   =   1
  55.          EndProperty
  56.          Height          =   375
  57.          Left            =   1470
  58.          TabIndex        =   2
  59.          Top             =   780
  60.          Width           =   3975
  61.       End
  62.       Begin VB.TextBox txtMStop 
  63.          BeginProperty DataFormat 
  64.             Type            =   1
  65.             Format          =   "0"
  66.             HaveTrueFalseNull=   0
  67.             FirstDayOfWeek  =   0
  68.             FirstWeekOfYear =   0
  69.             LCID            =   1033
  70.             SubFormatType   =   1
  71.          EndProperty
  72.          Height          =   375
  73.          Left            =   1470
  74.          TabIndex        =   3
  75.          Top             =   1260
  76.          Width           =   3975
  77.       End
  78.       Begin VB.TextBox txtTStart 
  79.          BeginProperty DataFormat 
  80.             Type            =   1
  81.             Format          =   "0"
  82.             HaveTrueFalseNull=   0
  83.             FirstDayOfWeek  =   0
  84.             FirstWeekOfYear =   0
  85.             LCID            =   1033
  86.             SubFormatType   =   1
  87.          EndProperty
  88.          Height          =   375
  89.          Left            =   1470
  90.          TabIndex        =   4
  91.          Top             =   1740
  92.          Width           =   3975
  93.       End
  94.       Begin VB.TextBox txtTStop 
  95.          BeginProperty DataFormat 
  96.             Type            =   1
  97.             Format          =   "0"
  98.             HaveTrueFalseNull=   0
  99.             FirstDayOfWeek  =   0
  100.             FirstWeekOfYear =   0
  101.             LCID            =   1033
  102.             SubFormatType   =   1
  103.          EndProperty
  104.          Height          =   375
  105.          Left            =   1470
  106.          TabIndex        =   5
  107.          Top             =   2220
  108.          Width           =   3975
  109.       End
  110.       Begin VB.TextBox txtMediaLength 
  111.          BeginProperty DataFormat 
  112.             Type            =   1
  113.             Format          =   "0"
  114.             HaveTrueFalseNull=   0
  115.             FirstDayOfWeek  =   0
  116.             FirstWeekOfYear =   0
  117.             LCID            =   1033
  118.             SubFormatType   =   1
  119.          EndProperty
  120.          Height          =   375
  121.          Left            =   1470
  122.          TabIndex        =   6
  123.          Top             =   2700
  124.          Width           =   3975
  125.       End
  126.       Begin VB.TextBox txtStreamNumber 
  127.          BeginProperty DataFormat 
  128.             Type            =   1
  129.             Format          =   "0"
  130.             HaveTrueFalseNull=   0
  131.             FirstDayOfWeek  =   0
  132.             FirstWeekOfYear =   0
  133.             LCID            =   1033
  134.             SubFormatType   =   1
  135.          EndProperty
  136.          Height          =   375
  137.          Left            =   1470
  138.          TabIndex        =   7
  139.          Top             =   3180
  140.          Width           =   3975
  141.       End
  142.       Begin VB.TextBox txtFPS 
  143.          BeginProperty DataFormat 
  144.             Type            =   1
  145.             Format          =   "0"
  146.             HaveTrueFalseNull=   0
  147.             FirstDayOfWeek  =   0
  148.             FirstWeekOfYear =   0
  149.             LCID            =   1033
  150.             SubFormatType   =   1
  151.          EndProperty
  152.          Height          =   375
  153.          Left            =   1470
  154.          TabIndex        =   8
  155.          Top             =   3660
  156.          Width           =   3975
  157.       End
  158.       Begin VB.TextBox txtStretchMode 
  159.          BeginProperty DataFormat 
  160.             Type            =   5
  161.             Format          =   ""
  162.             HaveTrueFalseNull=   1
  163.             TrueValue       =   "1"
  164.             FalseValue      =   "0"
  165.             NullValue       =   ""
  166.             FirstDayOfWeek  =   0
  167.             FirstWeekOfYear =   0
  168.             LCID            =   1033
  169.             SubFormatType   =   7
  170.          EndProperty
  171.          Height          =   375
  172.          Left            =   1470
  173.          TabIndex        =   9
  174.          Top             =   4140
  175.          Width           =   3975
  176.       End
  177.       Begin VB.TextBox txtMuted 
  178.          BeginProperty DataFormat 
  179.             Type            =   5
  180.             Format          =   ""
  181.             HaveTrueFalseNull=   1
  182.             TrueValue       =   "1"
  183.             FalseValue      =   "0"
  184.             NullValue       =   ""
  185.             FirstDayOfWeek  =   0
  186.             FirstWeekOfYear =   0
  187.             LCID            =   1033
  188.             SubFormatType   =   7
  189.          EndProperty
  190.          Height          =   375
  191.          Left            =   1470
  192.          TabIndex        =   10
  193.          Top             =   4620
  194.          Width           =   3975
  195.       End
  196.       Begin VB.CommandButton cmdBrowse 
  197.          Caption         =   "Browse"
  198.          Height          =   375
  199.          Left            =   5670
  200.          TabIndex        =   1
  201.          Top             =   300
  202.          Width           =   975
  203.       End
  204.       Begin VB.Label lblMediaName 
  205.          Caption         =   "MediaName"
  206.          Height          =   255
  207.          Left            =   150
  208.          TabIndex        =   23
  209.          Top             =   420
  210.          Width           =   1095
  211.       End
  212.       Begin VB.Label lblMStart 
  213.          Caption         =   "MStart"
  214.          Height          =   255
  215.          Left            =   150
  216.          TabIndex        =   22
  217.          Top             =   900
  218.          Width           =   735
  219.       End
  220.       Begin VB.Label lblMStop 
  221.          Caption         =   "MStop"
  222.          Height          =   255
  223.          Left            =   150
  224.          TabIndex        =   21
  225.          Top             =   1380
  226.          Width           =   615
  227.       End
  228.       Begin VB.Label lblTStart 
  229.          Caption         =   "TStart"
  230.          Height          =   255
  231.          Left            =   150
  232.          TabIndex        =   20
  233.          Top             =   1860
  234.          Width           =   615
  235.       End
  236.       Begin VB.Label lblTStop 
  237.          Caption         =   "TStop"
  238.          Height          =   255
  239.          Left            =   150
  240.          TabIndex        =   19
  241.          Top             =   2340
  242.          Width           =   615
  243.       End
  244.       Begin VB.Label lblMediaLength 
  245.          Caption         =   "MediaLength"
  246.          Height          =   255
  247.          Left            =   150
  248.          TabIndex        =   18
  249.          Top             =   2820
  250.          Width           =   975
  251.       End
  252.       Begin VB.Label lblStreamNumber 
  253.          Caption         =   "StreamNumber"
  254.          Height          =   255
  255.          Left            =   150
  256.          TabIndex        =   17
  257.          Top             =   3300
  258.          Width           =   1215
  259.       End
  260.       Begin VB.Label lblFPS 
  261.          Caption         =   "FPS"
  262.          Height          =   255
  263.          Left            =   150
  264.          TabIndex        =   16
  265.          Top             =   3780
  266.          Width           =   375
  267.       End
  268.       Begin VB.Label lblStretchMode 
  269.          Caption         =   "StretchMode"
  270.          Height          =   255
  271.          Left            =   150
  272.          TabIndex        =   15
  273.          Top             =   4260
  274.          Width           =   975
  275.       End
  276.       Begin VB.Label lblMuted 
  277.          Caption         =   "Muted"
  278.          Height          =   255
  279.          Left            =   150
  280.          TabIndex        =   14
  281.          Top             =   4740
  282.          Width           =   495
  283.       End
  284.    End
  285.    Begin MSComDlg.CommonDialog dlgCommonDialog2 
  286.       Left            =   75
  287.       Top             =   5250
  288.       _ExtentX        =   847
  289.       _ExtentY        =   847
  290.       _Version        =   393216
  291.    End
  292. Attribute VB_Name = "frmClip"
  293. Attribute VB_GlobalNameSpace = False
  294. Attribute VB_Creatable = False
  295. Attribute VB_PredeclaredId = True
  296. Attribute VB_Exposed = False
  297. '*******************************************************************************
  298. '*       This is a part of the Microsoft DXSDK Code Samples.
  299. '*       Copyright (C) 1999-2001 Microsoft Corporation.
  300. '*       All rights reserved.
  301. '*       This source code is only intended as a supplement to
  302. '*       Microsoft Development Tools and/or SDK documentation.
  303. '*       See these sources for detailed information regarding the
  304. '*       Microsoft samples programs.
  305. '*******************************************************************************
  306. Option Explicit
  307. Option Base 0
  308. Option Compare Text
  309. Private m_intUnloadMode As Integer
  310. Private Const DIALOG_TITLE = "Clip Help"
  311. ' **************************************************************************************************************************************
  312. ' * PUBLIC INTERFACE- PROPERTIES
  313.             ' ******************************************************************************************************************************
  314.             ' * procedure name: UnloadMode
  315.             ' * procedure description:  Returns an integer specifying the method from which this dialog was last unloaded
  316.             ' *
  317.             ' ******************************************************************************************************************************
  318.             Public Property Get UnloadMode() As Integer
  319.             On Local Error GoTo ErrLine
  320.             'return the value to the client
  321.             UnloadMode = m_intUnloadMode
  322.             Exit Property
  323.             
  324. ErrLine:
  325.             Err.Clear
  326.             Exit Property
  327.             End Property
  328.             
  329.             
  330. ' **************************************************************************************************************************************
  331. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  332.             ' ******************************************************************************************************************************
  333.             ' * procedure name: Form_Load
  334.             ' * procedure description:  Occurs when a form is loaded.
  335.             ' *
  336.             ' ******************************************************************************************************************************
  337.             Private Sub Form_Load()
  338.             On Local Error GoTo ErrLine
  339.              'set default value(s)
  340.             With Me
  341.                 .txtMediaName.Text = vbNullString
  342.                 .txtMStart.Text = vbNullString
  343.                 .txtMStop.Text = vbNullString
  344.                 .txtTStart.Text = vbNullString
  345.                 .txtTStop.Text = vbNullString
  346.                 .txtMediaLength.Text = vbNullString
  347.                 .txtStreamNumber.Text = vbNullString
  348.                 .txtFPS.Text = vbNullString
  349.                 .txtStretchMode.Text = vbNullString
  350.                 .txtMuted.Text = vbNullString
  351.             End With
  352.             Exit Sub
  353.             
  354. ErrLine:
  355.             Err.Clear
  356.             Exit Sub
  357.             End Sub
  358.             
  359.             
  360.             ' ******************************************************************************************************************************
  361.             ' * procedure name: Form_QueryUnload
  362.             ' * procedure description:  Occurs before a form or application closes.
  363.             ' *
  364.             ' ******************************************************************************************************************************
  365.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  366.             On Local Error GoTo ErrLine
  367.             
  368.             Select Case UnloadMode
  369.                 Case vbFormControlMenu
  370.                          '0 The user chose the Close command from the Control menu on the form.
  371.                          Cancel = 1: Me.Visible = False
  372.                 Case vbFormCode
  373.                          '1 The Unload statement is invoked from code.
  374.                 Case vbAppWindows
  375.                          '2 The current Microsoft Windows operating environment session is ending.
  376.                 Case vbAppTaskManager
  377.                          '3 The Microsoft Windows Task Manager is closing the application.
  378.                          End
  379.                 Case vbFormMDIForm
  380.                          '4 An MDI child form is closing because the MDI form is closing.
  381.                 Case vbFormOwner
  382.                          '5 A form is closing because its owner is closing
  383.             End Select
  384.             Exit Sub
  385.             
  386. ErrLine:
  387.             Err.Clear
  388.             Exit Sub
  389.             End Sub
  390.             
  391.             
  392.             ' ******************************************************************************************************************************
  393.             ' * procedure name: Form_Unload
  394.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  395.             ' *
  396.             ' ******************************************************************************************************************************
  397.             Private Sub Form_Unload(Cancel As Integer)
  398.             On Local Error GoTo ErrLine
  399.             With Me
  400.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  401.             End With
  402.             Exit Sub
  403.             
  404. ErrLine:
  405.             Err.Clear
  406.             Exit Sub
  407.             End Sub
  408. ' **************************************************************************************************************************************
  409. ' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
  410.             ' ******************************************************************************************************************************
  411.             ' * procedure name: cmdOk_Click
  412.             ' * procedure description:  occures when the 'Ok' command button is pressed; proceed to validate user input
  413.             ' *
  414.             ' ******************************************************************************************************************************
  415.             Private Sub cmdOk_Click()
  416.             Dim nResultant As VbMsgBoxResult
  417.             On Local Error GoTo ErrLine
  418.             
  419.             'validation code
  420.             If Me.txtMediaName.Text = vbNullString Then
  421.                 nResultant = MsgBox("You Must Select A File Name", , DIALOG_TITLE)
  422.                 Me.txtMediaName.SetFocus
  423.                 Exit Sub
  424.             End If
  425.             If Me.txtMStart.Text = vbNullString Then
  426.                 nResultant = MsgBox("You Must Set MStart", , DIALOG_TITLE)
  427.                 Me.txtMStart.SetFocus
  428.                 Exit Sub
  429.             End If
  430.             If Me.txtMStop.Text = vbNullString Then
  431.                 nResultant = MsgBox("You Must Set MStop", , DIALOG_TITLE)
  432.                 Me.txtMStop.SetFocus
  433.                 Exit Sub
  434.             End If
  435.             If Me.txtTStart.Text = vbNullString Then
  436.                 nResultant = MsgBox("You Must Set TStart", , DIALOG_TITLE)
  437.                 Me.txtTStart.SetFocus
  438.                 Exit Sub
  439.             End If
  440.             If Me.txtTStop.Text = vbNullString Then
  441.                 nResultant = MsgBox("You Must Set TStop", , DIALOG_TITLE)
  442.                 Me.txtTStop.SetFocus
  443.                 Exit Sub
  444.             End If
  445.             If Me.txtMediaLength.Text = vbNullString Then
  446.                 nResultant = MsgBox("You Must Set MediaLength", , DIALOG_TITLE)
  447.                 Me.txtMediaLength.SetFocus
  448.                 Exit Sub
  449.             End If
  450.             If Me.txtStreamNumber.Text = vbNullString Then
  451.                 nResultant = MsgBox("You Must Set StreamNumber", , DIALOG_TITLE)
  452.                 Me.txtStreamNumber.SetFocus
  453.                 Exit Sub
  454.             End If
  455.             If Me.txtFPS.Text = vbNullString Then
  456.                 nResultant = MsgBox("You Must Set FPS", , DIALOG_TITLE)
  457.                 Me.txtFPS.SetFocus
  458.                 Exit Sub
  459.             End If
  460.             If Me.txtStretchMode.Text = vbNullString Then
  461.                 nResultant = MsgBox("You Must Set StretchMode", , DIALOG_TITLE)
  462.                 Me.txtStretchMode.SetFocus
  463.                 Exit Sub
  464.             End If
  465.             If Me.txtMuted.Text = vbNullString Then
  466.                 nResultant = MsgBox("You Must Set Muted", , DIALOG_TITLE)
  467.                 Me.txtMuted.SetFocus
  468.                 Exit Sub
  469.             End If
  470.             If CLng(Me.txtMStart.Text) > CLng(Me.txtMStop.Text) Then
  471.                 nResultant = MsgBox("MStart Must Be Lower Then MStop", , DIALOG_TITLE)
  472.                 Me.txtMStart.SetFocus
  473.                 Exit Sub
  474.             End If
  475.             If CLng(Me.txtTStart.Text) > CLng(Me.txtTStop.Text) Then
  476.                 nResultant = MsgBox("TStart Must Be Lower Then TStop", , DIALOG_TITLE)
  477.                 Me.txtTStart.SetFocus
  478.                 Exit Sub
  479.             End If
  480.             
  481.             'hide the dialog
  482.             Me.Visible = False
  483.             Exit Sub
  484.             
  485. ErrLine:
  486.             Err.Clear
  487.             Exit Sub
  488.             End Sub
  489.             
  490.             
  491.             ' ******************************************************************************************************************************
  492.             ' * procedure name: cmdCancel_Click
  493.             ' * procedure description:  occures when the 'Cancel' command button is pressed
  494.             ' *
  495.             ' ******************************************************************************************************************************
  496.             Private Sub cmdCancel_Click()
  497.             On Local Error GoTo ErrLine
  498.             'hide the dialog
  499.             Me.Visible = False
  500.             m_intUnloadMode = 1
  501.             Exit Sub
  502.             
  503. ErrLine:
  504.             Err.Clear
  505.             Exit Sub
  506.             End Sub
  507.             
  508.             
  509.             ' ******************************************************************************************************************************
  510.             ' * procedure name: cmdBrowse_Click
  511.             ' * procedure description:  occures when the 'Browse' command button is pressed
  512.             ' *
  513.             ' ******************************************************************************************************************************
  514.             Private Sub cmdBrowse_Click()
  515.             Dim bstrFilename As String
  516.             On Local Error GoTo ErrLine
  517.             
  518.             'request a filename from the user..
  519.             bstrFilename = ShowCommonDlgOpen(, vbNullString, "Media Files(*.asf, *.avi, *.au, *.mpeg, *.mpg, *.wav)")
  520.             'validate the user's input from the common dialog
  521.             If Len(bstrFilename) = 0 Then
  522.                Exit Sub
  523.             Else: Me.txtMediaName.Text = bstrFilename
  524.             End If
  525.             Exit Sub
  526.             
  527. ErrLine:
  528.             Err.Clear
  529.             Exit Sub
  530.             End Sub
  531.